<%@ include file="/WEB-INF/views/taglib.jsp" %>
<h3>Section Form</h3>	
	<form:form id="form" method="post" modelAttribute="section"  cssClass="simpleForm">
		<form:hidden path="sectionId" />
		<form:hidden path="active" />
		
	 	<div class="clear" style="height:1px">&nbsp;</div>
		<jsp:include page="/WEB-INF/views/message.jsp"></jsp:include>
	  	<fieldset>
	  		<legend>Section Info</legend>
	  		<p>
	  		<aims:column cssErrorClass="error" path="sectionCode" >
	  		<form:label path="sectionCode">
	  			Section Code  * 
	 		</form:label>
	  		<form:input path="sectionCode" /> <form:errors path="sectionCode"  cssClass="errorSimple" /> 
			</aims:column>
			<aims:column cssErrorClass="error" path="sectionName" >
	  		<form:label path="sectionName">
	  			Section Name * 
	 		</form:label>
	  		<form:input path="sectionName" /> <form:errors path="sectionName"  cssClass="errorSimple" />	 
			</aims:column>
			<aims:column cssErrorClass="error" path="department" >
	  		<form:label path="department.departmentId">
	  			Department *
	 		</form:label>
	 		<form:select path="department.departmentId">
	 			<form:option value=""></form:option>
	 			<form:options items="${globalDepartment}" itemValue="departmentId" itemLabel="departmentName" />
	 		</form:select>
	  		 <form:errors path="department"  cssClass="errorSimple" />	 
			</aims:column>
			</fieldset>
      <div class="action">
	  	<c:choose>
	  		<c:when test="${section.sectionId==null}">
	  			<button type="submit" class="button positive">
	  			Save
	  			</button>
	  			<a href="<c:url value="/section/search" />" class="button">Back</a>
	  		</c:when>
	  		<c:when test="${section.sectionId!=null}">
  				<button type="submit"  class="button positive">
  				Update</button>
  				<a href="<c:url value="/section/search" />" class="button">Back</a>
	  		</c:when>
	  	</c:choose>
	 </div>	
	</form:form>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
	</script>